package Box2D.Dynamics.Joints
{
	import Box2D.Common.Math.b2Vec2;
	import Box2D.Dynamics.b2Body;

	public class b2DistanceJointDef extends b2JointDef
	{
		private var _localAnchorA:b2Vec2;
		private var _localAnchorB:b2Vec2;
		public function b2DistanceJointDef()
		{
			super(callDirect('b2DistanceJointDef_new'));
			_localAnchorA = new b2Vec2(0,0,_wrapper+17);
			_localAnchorB = new b2Vec2(0,0,_wrapper+25);
		}
		public override function get cls():Class{return b2DistanceJoint}
		
		public function Initialize(bodyA:b2Body, bodyB:b2Body,anchorA:b2Vec2, anchorB:b2Vec2):void
		{
			call('b2DistanceJointDef_Initialize',bodyA.wrapper,bodyB.wrapper,anchorA.wrapper,anchorB.wrapper);
		}
		
		/// The local anchor point relative to body1's origin.
		public function get localAnchorA():b2Vec2{return _localAnchorA}
		public function set localAnchorA(value:b2Vec2):void{_localAnchorA.Copy(value)}
		
		/// The local anchor point relative to body2's origin.
		public function get localAnchorB():b2Vec2{return _localAnchorB}
		public function set localAnchorB(value:b2Vec2):void{_localAnchorB.Copy(value)}
		
		/// The natural length between the anchor points.
		public function get length():Number{return getNumber(33)}
		public function set length(value:Number):void{setNumber(33,value)}
		
		/// The mass-spring-damper frequency in Hertz.
		public function get frequencyHz():Number{return getNumber(37)}
		public function set frequencyHz(value:Number):void{setNumber(37,value)}
		
		/// The damping ratio. 0 = no damping, 1 = critical damping.
		public function get dampingRatio():Number{return getNumber(41)}
		public function set dampingRatio(value:Number):void{setNumber(41,value)}
	}
}